package com.guli.order.config;

import com.guli.order.feignInteceptor.RequestHeaderFeignInterceptor;
import feign.RequestInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*
 * @Author 罗俊
 * @date 2020/11/19 - 9:00 上午
 *
 */
@Configuration
@Slf4j
public class FeignInterceptorConfig {

    @Bean
    public RequestInterceptor requestInterceptor(){

        log.info("正在创建 feign 的请求拦截器");

        return new RequestHeaderFeignInterceptor();
    }
}
